Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
thetaPC
commented
Jul 27, 2026
Contributor
Author
There was a problem hiding this comment.
This isn't being used anywhere, RR uses ESLint.
thetaPC
commented
Jul 27, 2026
| "fs-extra": "^9.0.1", | ||
| "jest": "^29.7.0", | ||
| "jest-environment-jsdom": "^29.7.0", | ||
| "np": "^6.4.0", |
thetaPC
commented
Jul 27, 2026
| }, | ||
| "homepage": "https://github.com/ionic-team/ionic-framework#readme", | ||
| "devDependencies": { | ||
| "@babel/types": "^7.18.4", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue number: resolves #29716
What is the current behavior?
The Ionic Framework packages each carried their own independent TypeScript configuration, and only
@ionic/angular-serverextended from the roottsconfig.json. As a result the settings had drifted apart across packages:moduleResolutionused the classicnoderesolver in several packages.libwas pinned toes2017(and other mixed values).modulewas set to older values such ases2015in places.targetranged fromes2015toes2020depending on the package.This made the setup harder to maintain and kept the framework on older TypeScript defaults.
Linting had drifted the same way. Most packages ran ESLint
7with@typescript-eslint5/6and legacy.eslintrcconfig, while@ionic/angularhad already moved to ESLint9with flat config. The older@typescript-eslintparsers predate TypeScript6and do not officially support it, so once the framework moves to TypeScript6the linter can no longer reliably parse the source it is checking.What is the new behavior?
Modernizes the TypeScript setup so every package shares a single base configuration and modern compiler options.
core/tsconfig.base.json, and every package extends it, keeping only package specific overrides locally. It lives incore/rather than at the repo root because core is the only package present in every build context, including the Vercel preview which builds core in isolation. Since every package already depends on core, the base is reachable everywhere without any per environment workarounds.@ionic/*path aliases from the old root config. Three of them pointed at directories that no longer exist since the packages moved underpackages/.moduleResolutionupdated fromnodetobundler.libupdated toes2022.moduleupdated toesnext.targetupdated toes2022.6.xacross the packages to align with@ionic/angular.Changes that followed from the above:
@ionic/reactdeclareto the inheritedcontextclass fields, required by thees2022useDefineForClassFieldsdefault.tsconfig.spec.jsonwithisolatedModulessots-jestruns under TypeScript 6.components.tsto.prettierignoreso core builds no longer reformat it. It is regenerated by core's Stencil React output target, so like the other generated files it should not be prettier formatted.proxies.tsentry, which has matched no file since chore(deps): update react and stencil/react-output-target #31063 replaced the oldproxies.tswithcomponents.ts.@testing-library/reactfrom 13 to 16 (and added its now required@testing-library/dompeer), which clears theReactDOMTestUtils.actdeprecation warning in the test run.@testing-library/jest-domfrom 5 to 7, updated a spec's import from the removed@testing-library/jest-dom/extend-expectpath to@testing-library/jest-dom.@ionic/react-routerdeclareto the inheritedcontextclass field, required by thees2022useDefineForClassFieldsdefault (the same change made in@ionic/react).rootDirso@rollup/plugin-typescriptcan determine the output file layout, which resolves the TS5011 advisory it otherwise emits.@ionic/react,@ionic/vue, and@ionic/angular. After the build it asserts a clean git tree, so unformatted committed source now fails CI. A preceding step reverts thecore/package.jsonandpackages/react/package.jsonupdates thatnpm run syncand the react build archive produce, since those are expected.@ionic/vuerootDirwas intentionally not added. It surfaces a set of pre-existing type errors, which are deferred to a dedicated PR so this one stays focused on the setup.@ionic/vue-routerrootDirdeferred for the same reason as@ionic/vue.core/package.json, since the vue build archive does not include apackage.json.@ionic/angulartscscript, since the build already type checks like the other packages.scripts/rollup.config.js,scripts/rollup.config.legacy.js,scripts/package.json). These date back to the manualtscplus rollup plus gulp pipeline Ionic used before migrating to ng-packagr around Angular 9, for Angular versions no longer supported (this branch supports Angular 18 and above).outDir, which existed to hold thetscoutput that the pre-ng-packagr pipeline bundled from. ng-packagr manages its own output, so it no longer serves a purpose.ESLint 9 and flat config
Moving to TypeScript 6 leaves the old linter behind, so the ESLint setup is upgraded to match.
@ionic/angularhad already migrated to ESLint 9 with flat config; this brings the remaining packages in line with it.eslintfrom7to9and@typescript-eslint/*from5/6to8acrosscore,@ionic/react,@ionic/react-router,@ionic/vue,@ionic/vue-router, and@ionic/angular-server.@ionic/angularwas already on these versions..eslintrc.*and.eslintignoretoeslint.config.js(flat config). The shared@ionic/eslint-configis still authored in eslintrc format, so it is bridged throughFlatCompat, the same approach@ionic/angularalready uses.overridesentry, scoped to@ionic/eslint-config, in every package.@ionic/eslint-config@0.3.0still declares an ancient@typescript-eslint@^4(and an oldeslint-plugin-import), which npm installs nested inside it. Those versions peer require an ESLint older than 9, so under ESLint 9 they breaknpm installwith anERESOLVEand theimport/newline-after-importrule crashes on the removedcontext.getScope. The override forces@ionic/eslint-config's copies up to the versions the package already declares, so the stale incompatible packages never get installed andnpm installandnpm ciresolve cleanly.eslint-plugin-importto^2.31.0in each package. The version@ionic/eslint-configpulls in transitively (^2.22.0) resolves an ESLint 9 incompatible release whoseimport/newline-after-importrule calls the removedcontext.getScopeand crashes the run.@ionic/angularalready declares this plugin directly for the same reason.typescriptdevDependency tocore. It did not declare one, and the ESLint 9 type aware parser needs a TypeScript that understands thebundlermoduleResolution used in the shared tsconfig.ban-typeswas removed in@typescript-eslint8, so its successorsno-empty-object-typeandno-unsafe-function-typeare turned off to preserve the old stance.no-unused-expressionsis configured withallowShortCircuitandallowTernaryto keep the existing short-circuit side-effect style.coreturns offprefer-optional-chainto match the other packages, because the stricter rule in@typescript-eslint8 flagged datetime guards where optional chaining would break type narrowing.eslint-disabledirectives that no longer suppress anything, and applied the few small fixes the stricter ruleset surfaced, such as wrapping two conditionals inBoolean()and dropping unusedcatchbindings.Does this introduce a breaking change?
The compiled output now targets
es2022(previouslyes2015/es2017), and building the framework requires TypeScript6.x. Consuming applications should be on a toolchain that supportses2022output.Other information
The
FlatCompatbridge, the@ionic/eslint-configoverrides, the directeslint-plugin-importrequirement, and core's explicittypescriptdevDependency are only needed because the shared@ionic/eslint-configis behind the current ESLint ecosystem. To let the framework drop them,@ionic/eslint-configshould be updated to:flat/recommendedexport) so consumers no longer needFlatCompator the@eslint/eslintrcand@eslint/jsbridge dependencies.@typescript-eslint/*8,eslint-plugin-import2.31 or newer,eslint-config-prettier10, and aneslintpeer of 9.Once that ships, each package here can drop
FlatCompat, the bridge dependencies, the@ionic/eslint-configoverrides, the directeslint-plugin-importrequirement, and core's explicittypescript, leaving a much smallereslint.config.js.